﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TTSoft.MyApp.Models
{
    #region Using
    using TTSoft.MyApp.Helpers;
    #endregion

    public class DataContext
    {
        private static QLTVEntities _dataContext = null;

        static DataContext()
        {
            try
            {
                _dataContext = new QLTVEntities(GlobalVars.BuildEntityConnectionString());
            }
            catch(Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        public static QLTVEntities Instance
        {
            get { return _dataContext; }
        }
    }
}